

/*---------------------------------------------------------
   Initializes the effect. The data is a table of data 
   which was passed from the server.
---------------------------------------------------------*/
function EFFECT:Init( data )
	
	local pos = data:GetOrigin()
	
	local emitter = ParticleEmitter( pos )
	
	for i=1,math.random(10,15) do
		
		local particle = emitter:Add( "particles/smokey", pos )

		particle:SetVelocity(Vector(math.random(-65, 65),math.random(-65, 65), math.random(-65, 65)))
		particle:SetDieTime( math.random(10,49)/10 )
		particle:SetStartAlpha( math.Rand( 90, 135 ) )
		particle:SetStartSize( math.Rand( 5, 15 ) )
		particle:SetEndSize( math.Rand( 90, 216 ) )
		particle:SetRoll( math.Rand( -95, 95 ) )
		particle:SetRollDelta( math.Rand( -0.12, 0.12 ) )
		particle:SetColor( 10,10,10 )
				
		emitter:Finish()
		
	end
	
	for i=1,math.random(1,5) do
		
		local particle = emitter:Add( "effects/yellowflare", pos )

		particle:SetVelocity(Vector(math.random(-60, 60),math.random(-60, 60), math.random(-60, 60)))
		particle:SetDieTime( math.random(3,8)/10 )
		particle:SetStartAlpha( math.Rand( 20, 75 ) )
		particle:SetStartSize( math.Rand( 5, 10 ) )
		particle:SetEndSize( math.Rand( 25, 30 ) )
		particle:SetRoll( math.Rand( -95, 95 ) )
		particle:SetRollDelta( math.Rand( -0.12, 0.12 ) )
		particle:SetColor( 225,205,170 )
				
		emitter:Finish()
		
	end
	
	for i=0,math.random(3,6) do
	
		local emitter = ParticleEmitter(pos)
		local particle = emitter:Add("effects/fire_cloud1", pos )
		particle:SetDieTime(math.random(6,9)/10)
		particle:SetStartAlpha(math.random(80,130))
		particle:SetEndAlpha(150)
		particle:SetStartSize(math.random(4,5))
		particle:SetEndSize(1)
		particle:SetRoll(math.random(-180,180))
		particle:SetColor(255, 220, 100)
		emitter:Finish()
		
	end
	
end


/*---------------------------------------------------------
   THINK
   Returning false makes the entity die
---------------------------------------------------------*/
function EFFECT:Think( )

	// Die instantly
	return false
	
end


/*---------------------------------------------------------
   Draw the effect
---------------------------------------------------------*/
function EFFECT:Render()

	// Do nothing - this effect is only used to spawn the particles in Init
	
end



